package com.ryskoo.common.constant;

/**
 * 订单类型
 *
 * @author Monster
 */
public enum OrderSourceEnum {
    PC(1, "PC"),
    WAP(2, "WAP"),
    SMALL(3, "小程序"),
    APP(4, "APP");

    private int value;
    private String name;

    OrderSourceEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(int value) {
        for (OrderSourceEnum ote : OrderSourceEnum.values()) {
            if (ote.getValue() == value) {
                return ote.getName();
            }
        }
        return "";
    }
}
